<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="最爱古风小雷丘">
    <title></title>
    <style>
        .box{
            width: 305px;
            margin: 100px auto;
        }
        .box .top .big img{
            width: 210px;
            height: 210px;
            border: 1px solid;
        }
        ul{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        li img{
            width: 70px;
            height: 70px;
        }
        .box .top{
            display: flex;
            justify-content: space-between;
        }
        .box .bottom{
            display: flex;
            flex-wrap: wrap;
            /* padding-left: 5px; */
        }
        .bottom>li{
            /* margin-left: 5px; */
             padding-left: 8px;
        }
        .bottom>li:nth-child(1),
        .bottom>li:nth-child(5){
            padding-left: 0;
        }
        img{
            border-radius: 10px;
        }
    </style>
</head>
<body>
     
    <div class="box">
        <div class="top">
            <div class="big">
                <img src="img/big_1.jpg" alt="">
            </div>
            <ul class="left">
                <li> <img src="img/small_1.jpg" alt=""> </li>
                <li> <img src="img/small_2.jpg" alt=""> </li>
                <li> <img src="img/small_3.jpg" alt=""> </li>
            </ul>
        </div>
        <ul class="bottom">
            <li><img src="img/small_4.jpg" alt=""></li>
            <li><img src="img/small_5.jpg" alt=""></li>
            <li><img src="img/small_6.jpg" alt=""></li>
            <li><img src="img/small_7.jpg" alt=""></li>
            <li><img src="img/small_8.jpg" alt=""></li>
            <li><img src="img/small_9.jpg" alt=""></li>
            <li><img src="img/small_10.jpg" alt=""></li>
            <li><img src="img/small_11.jpg" alt=""></li>
        </ul>
    </div>
</body>
</html>
<script>
    var big = document.querySelector('.big img');
    var lis = document.querySelectorAll('img');
    // console.log(big)
    for(var i = 0;i < lis.length;i++){

          lis[i].index = i;
        //   console.log(lis[i].index)
         lis[i].onmouseover = function(){
         big.src = 'img/big_' + this.index + '.jpg';
    }
    }
    big.onmouseover = function(){
        big.src = "img/big_1.jpg";
    }
   
</script>